﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EnterpriseFramework.Configuration
{
    public struct Messages
    {
        //public string GetMessage(string MessageID, string Language)
        //{
        //    if (ConfigurationManagers.BasicSetting.ErrorMessagesConfig.MType == ConfigurationSettings.MessageType.XML)
        //    {
        //        XmlReader reader = XmlReader.Create(ConfigurationManagers.BasicSetting.ErrorMessagesConfig.Path);

        //        while (reader.Read())
        //        {
        //            if (reader.NodeType.Equals(XmlNodeType.Element) && reader.Name.Equals("Message") &&
        //            reader.IsStartElement())
        //                if (reader["ID"] == MessageID)
        //                    while (reader.Read())
        //                        if (reader.NodeType == XmlNodeType.Element && reader.Name == "Language")
        //                            if (reader["Name"] == Language)
        //                            {
        //                                reader.Read();
        //                                return reader.Value.Trim();
        //                            }
        //        }
        //    }
        //    else
        //    {
        //        //After finish from Select method that take select statemet and ExecuteScale method.

        //        //ConfigurationManagers.BasicSetting.ErrorMessagesConfig.Provider
        //        //var cmd = Configurations.ConfigurationManagers.Providers.DefaultProvider.GetSelectCommand(table, query);
        //        //return provider.ExecuteReader(cmd, table.Columns);
        //    }
        //    return string.Empty;
        //}
    }
}
